var HandSource:TextAsset;

function GetSlot(PlayerNum:int,SlotNum:int)
{
	var sourceString: String=HandSource.text;
	var allSlots= new Array();
	var curSlot= new Array();
	allSlots=sourceString.Split('\n'[0]);
	
	Debug.Log("allSlots:" + allSlots.length);
	for(curLine in allSlots)
	{
		//Debug.Log("Before First If:" + curLine);
		if(curLine.Substring(0,2)!="//")
		{
			//Debug.Log("After Comment Check: " +curLine);
			curSlot=curLine.Split(':'[0]);
			
			//Debug.Log(PlayerNum.ToString() + "    " +SlotNum.ToString());
			if ((curSlot[0]==PlayerNum.ToString())&&(curSlot[1]==SlotNum.ToString()))
			{
				//Debug.Log("After Input Check: " +curLine);
				Debug.Log("Finishing slot");
				return curSlot;
			}
		}
	}
	
	return ["Bad Slot"];
}

function GetAISlot(PlayerName:String,SlotNum:int){
	var sourceString: String=HandSource.text;
	var allSlots= new Array();
	var curSlot= new Array();
	allSlots=sourceString.Split('\n'[0]);
	
	Debug.Log("allSlots:" + allSlots.length);
	for(curLine in allSlots)
	{
		//Debug.Log("Before First If:" + curLine);
		if(curLine.Substring(0,2)!="//")
		{
			//Debug.Log("After Comment Check: " +curLine);
			curSlot=curLine.Split(':'[0]);
			
			//Debug.Log(PlayerNum.ToString() + "    " +SlotNum.ToString());
			if ((curSlot[0]==PlayerName)&&(curSlot[1]==SlotNum.ToString()))
			{
				//Debug.Log("After Input Check: " +curLine);
				Debug.Log("Finishing slot");
				return curSlot;
			}
		}
	}
}
	
	return ["Bad Slot"];